<template>
  <div id="scanDetail">
    <div class="title">{{messageDetail.title}}</div>
    <div class="title_small">{{messageDetail.sendtime}}</div>
    <div class="content">{{messageDetail.content}}</div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      messageDetail: {}
    };
  },
  onLoad(e) {
    this.fnDetail(e.id);
  },
  methods: {
    fnDetail(id) {
      this.$http
        .post({
          url: "/mobile/api/readmessage",
          data: {
            customer_id: wx.getStorageSync("userInfo").customer_id,
            id: id
          }
        })
        .then(res => {
          if (res.code == "RX0000") {
            this.messageDetail = res;
          } else {
            wx.showToast({
              title: res.data
            });
          }
        });
    }
  }
};
</script>
<style lang="less">
#scanDetail {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  .title {
    font-size: 18px;
    height: 25px;
    line-height: 25px;
    width: 100%;
    text-align: center;
    font-weight: bolder;
  }
  .title_small {
    height: 25px;
    /*line-height: 25px;*/
    width: 100%;
    color: #333;
    font-size: 12px;
    text-align: center;
  }
  .content {
    color: #333;
    font-size: 14px;
    text-indent: 32px;
  }
}
</style>
